/**
 * Copyright (c) 2024 Huawei Technologies Co., Ltd.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE-MIT file in the root directory of this source tree.
 */

import React from 'react';
import {Text, View} from 'react-native';
import WebView from 'react-native-webview';

const source = require('./index.html');

function App() {
  return (
    <View style={{backgroundColor: 'lightblue', flex: 1, padding: 20}}>
      <Text>
        Lorem, ipsum dolor sit amet consectetur adipisicing elit. Aut quo a
        accusamus obcaecati rem! Qui itaque, necessitatibus ex cupiditate,
        distinctio officiis laborum velit nemo officia voluptatibus sequi illum
        iure odit!
      </Text>
      <View style={{backgroundColor: 'green', flex: 1}}>
        <View
          style={{
            width: '100%',
            height: 400,
            backgroundColor: 'pink',
          }}>
          <WebView source={source} originWhitelist={['*']} />
        </View>
      </View>
      <Text>
        Lorem, ipsum dolor sit amet consectetur adipisicing elit. Aut quo a
        accusamus obcaecati rem! Qui itaque, necessitatibus ex cupiditate,
        distinctio officiis laborum velit nemo officia voluptatibus sequi illum
        iure odit!
      </Text>
    </View>
  );
}

export default App;
